package com.example.springboottest.example.deamon;

public class DeamonThread extends Thread {

    @Override
    public void run() {
        try {
            while (true) {
                System.out.println("休息5秒钟");
                Thread.sleep(5 * 1000);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}